<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/tabs.jsp" %>
<html>
<head>
	<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/public.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
	<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
	<title></title>
	<script type="text/javascript">
		/*********收费流程*************/
		/**
		 * 打开收费周期页面
		 */
	   function showCycleForward(){
	   		var url = "${ctx}/charge_chargeCycleForwardAction.do?method=chargeCycleForwardSmall";
			top.windowOpen(url, "chargeCycleForward", "", 340, 900);
	   }
	   /**
	    *  收费周期跳转页面方法
	    */
	   function cycleForward(url){
	   		window.location.href=url;
	   }
		/****************************/
		var method = "outList";
		function search(){
			var url = "${ctx}/charge_bankCollection.do?method=" + method + getSearchValue();
			window.frames("collectionFrame").location.href = url;
		}
		/**
		 *  刷新列表
		 */
		function flushFrame(){
			var url = "${ctx}/charge_bankCollection.do?method=" + method;
			window.frames("collectionFrame").location.href = url;
		}
		/**
		 *  获取查询的条件
		 */
		function getSearchValue(){
			//var bankId = document.getElementById("bankId").value;
			var periodId = document.getElementById("periodid").value;

			//var searchStr = "&bankId=" + bankId + "&periodId=" + periodId;
			var searchStr =  "&periodId=" + periodId;
			return searchStr;
		}

		/**
		 *	打开银行出/回盘页面
		 */
         /*
		function openOut(){
			var url = "${ctx}/charge_bankCollection.do?method=initOut";
			//top.windowOpen(url, "collectionOut", "${key.charge_collection_out}", 180, 400,true,"collectionOutFrame");
			AlarmConfirm('${key.charge_collection_out_tip}',"main","out");
		}
       
       
		function out(){
			var url = "${ctx}/charge_bankCollection.do?method=outFile";
			//var param = "bankId=" + $("bankId").value;
		  showLoading("${key.loadMessage}");
		  new Ajax.Request(url,
					         { method:'post',
							   onComplete:function(transport){
							        hiddenLoading();
							   		ajaxSubmitException(transport.responseText);
							   		flushFrame();
							   }
							 });
		}
         */
         
         /**
         *  打开银行出/回盘页面
         */
        function openOut(){
            //var url = "${ctx}/charge_bankCollection.do?method=initOut";
            //top.windowOpen(url, "collectionOut", "${key.charge_collection_out}", 180, 400,true,"collectionOutFrame");
            //AlarmConfirm('${key.charge_collection_out_tip}',"main","out");
                 
            var url = encodeURI(encodeURI("${ctx}/charge_alarmOutConfirm.do?alarmInfo=${key.charge_collection_out_tip}&parentFrameId=main&callBackMethodName=out"));
            if(this.windowOpen){  //一定要加上this
                windowOpen(url, 'alarmOutConfirm', "警告", 190, 400, true, 'alarmOutConfirmIf');
            }else{
               top.windowOpen(url, 'alarmOutConfirm', "警告", 190, 400, true, 'alarmOutConfirmIf');
            }
            
        }

        function out(isUsePreBlance){
            
          var url = "${ctx}/charge_bankCollection.do?method=outFile&isUsePrepareBlance=" +  isUsePreBlance;
            //var param = "bankId=" + $("bankId").value;
          showLoading("${key.loadMessage}");
          new Ajax.Request(url,
                             { method:'post',
                               onComplete:function(transport){
                                    hiddenLoading();
                                    ajaxSubmitException(transport.responseText);
                                    flushFrame();
                               }
                             });
        }
		function openIn(){
			var url = "${ctx}/charge_bankCollection.do?method=initIn";
			top.windowOpen(url, "collectionIn", "${key.charge_collection_in}", 215, 400,true,"collectionInFrame");
		}
		/**
		 * 当tab页改变时, 要改变一些数据
		 */
		function tabChangerHandler(tabFlag){
			if(tabFlag == "out")  method = "outList";
			if(tabFlag == "in")  method = "inList";
			document.getElementById("bankId").selectedIndex = 0;
			document.getElementById("periodid").selectedIndex = 0;
		}

		/**
		 *银行账号查询
		 */
		function bankAccountSearch(){
			var url = "${ctx}/charge_bankAccountAction.do?method=setBankAccountSearch";
			var params = $("bankAccountSearchForm").serialize();
			sendAjaxRequest(url,params,refleshBankAccountFrame);
		}

		function refleshBankAccountFrame(){
			var url ="${ctx}/charge_bankAccountAction.do?method=queryBankAccountList";
  			document.frames["collectionFrame"].document.location.href = url;
		}

	</script>
</head>
<body>
<div id="inDIV" style="display:none">
     <table border="0" cellpadding="0" cellspacing="0" id="ico1">
         <tr>
         <pms:AuthTag authName="charge_bankCollection.do?method=outFile">
           <td class="toolbarico">
	           	<a href="#" onclick="openOut();" onfocus="this.blur()">
	           		<img src="${ctx}/images/ico_yhhk_cp.gif" border="0" align="absbottom" alt="${key.charge_collection_out}"/> ${key.charge_collection_out}
	           	</a>
           </td>
           </pms:AuthTag>
        </tr>
      </table>
</div>
<div id="outDIV"  style="display:none">
    <table border="0" cellpadding="0" cellspacing="0" id="ico2">
        <tr>
        <pms:AuthTag authName="charge_bankCollection.do?method=inFile">
           <td class="toolbarico">
           		<a href="#"  onclick="openIn();"onfocus="this.blur()">
           			<img src="${ctx}/images/ico_yhhk_rp.gif" border="0" align="absbottom" alt="${key.charge_collection_in}"/> ${key.charge_collection_in}
           		</a>
           	</td>
         </pms:AuthTag>
         </tr>
    </table>
</div>
<div class="pageNav_bg">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="50" id="pageNav_leftimg">
      	<img src="${ctx}/images/ico_charge_yhts.gif" width="46" height="47"/>
      </td>
      <td id="navWord"><span class="page_title">${key.charge_collection_bank}</span></td>
      <td width="212" class="pageNav_right">
      	<a href="#" style="CURSOR: hand;" onFocus="this.blur()" onClick="showCycleForward();">
      		<img src="${ctx}/images/charage_buzhou.gif" border="0">
      	</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      	<a href="javascript:showFull_in();">
      		<img id="full_image"  src="${ctx}/images/ico_fullscreen.gif" border="0"/>
      	</a>
      </td>
    </tr>
  </table>
</div>


<!----------------------出回盘 搜索------------------------->
<div id="inOutSearchDiv" style="display: none;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="bg_search">
	        <table border="0" cellpadding="0" cellspacing="0" id="search01" >
		  	<tr>
			  	<td class="td_search" >${key.charge_collection_period}：</td>
                <td class="td_search">
                    	<pms:unitedSelect
                    		id="periodid"
                    		name="period"
                    		optionLabel="period"
                    		optionValue="keyword"
                    		selectText="${key.pleaseSelect}"
                    		dataList="${periodList}"
                    		style="width:90px;">
                    	</pms:unitedSelect>
                </td>
                <td class="td_search">
                	<table border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                      <td class="buttonOffLeft" id="btn1_11"></td>
                      <td class="buttonOffMiddle"
                      	  id="btn1_12"
                      	  onblur="btn_change(1)"
                      	  onMouseOver="btn_change_over(1)"
                      	  onMouseOut="btn_change_out(1)"
                      	  onclick="search();">
                      		<img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle" /> ${key.search}
                      </td>
                      <td class="buttonOffRight" id="btn1_13"></td>
                    </tr>
                	</table>
                </td>
	        </tr>
			</table>
			<td>
		<tr>
	</table>
</div>

<!----------------------银行账号 搜索------------------------->
 <div id="bankAccountSearchDiv" style="display: none;">
	 <form  id="bankAccountSearchForm" name="bankAccountSearchForm"  method="post" action=""  target="noteIfm">
	 <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
	    <td>
	    <table width="100%" border="0" cellpadding="0" cellspacing="0"  >
	        <tr>
	        <td align="left" valign="middle" class="bg_search2">
		    <table border="0" align="left" cellpadding="0" cellspacing="1" id="search01" >
		         <tr>
		         	 <td class="td_search">房 号：</td>
		             <td class="td_search" style="width:90px;"><input id="houseNumber" name="houseNumber" type="text" class="inputtext" size="16" maxlength="30" onkeydown="javascript:if (event.keyCode==13) bankAccountSearch();"></td>
	                 <td class="td_search">业主姓名：</td>
	                 <td class="td_search"><input id="clients" name="clients" type="text" class="inputtext" size="16" maxlength="30"  onkeydown="javascript:if (event.keyCode==13) bankAccountSearch();"></td>
	                 <td class="grid align_left">开户人：</td>
	                 <td class="td_search"><input id="accOwner" name="accOwner" type="text" class="inputtext" size="16" maxlength="30"  onkeydown="javascript:if (event.keyCode==13) bankAccountSearch();"></td>
					 <td class="td_search">&nbsp;</td>
				 </tr>
				 <tr>
				  	 <td class="td_search">银行名称：</td>
	                 <td class="td_search align_left" >
						<pms:unitedSelect
		              		id="bankId"
		              		name="bankId"
		              		optionLabel="bankName"
		              		optionValue="keyword"
		              		selectText="请选择..."
		              		dataList="${feeBankList}"
		              		style="width:110px;">
	              		</pms:unitedSelect>
	                  </td>
		  		 <td class="td_search">银行账号：</td>
	             <td class="td_search"><input id="accNumber" name="accNumber" type="text" class="inputtext" size="16" maxlength="30"  onkeydown="javascript:if (event.keyCode==13) bankAccountSearch();"></td>
	             <td class="td_search">&nbsp;</td>
			 	 <td class="td_search" align="right">
					 <table border="0" cellpadding="0" cellspacing="0" >
		                <tr><td class="buttonOffLeft" id="btn1_11"></td>
			                <td class="buttonOffMiddle"
			                	id="btn1_12"
			                	onblur="btn_change(1)"
			                	onclick="bankAccountSearch();"
			                	onMouseOver="btn_change_over(1)"
			                	onMouseOut="btn_change_out(1)">
			                	<img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle">${key.search}
			                  </td>
			                <td class="buttonOffRight" id="btn1_13"></td>
		                </tr>
		             </table>
		          </td>
		          <td class="td_search">&nbsp;</td>
		         </tr>
		     </table>
	        </td>
	         </tr>
	     </table>
	     </tr>
	  </table>
	  </form>
  </div>
<!--------------------- end ------------------------->

<div class="container">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
       <td class="bg_toolBar2">
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
        		<tr>
          			<td>
						<pms:tabPanel panelId="areaBase" hasTop="false" iframeId="collectionFrame" defaultHeight="410px">
							<pms:AuthTag authName="charge_bankCollection.do?method=initOutList">
							<pms:tab tabId="projectInfo"
									 baseUrl="${ctx}/charge_bankCollection.do?method=initOutList"
									 caption="${key.charge_collection_out_list}"
									 afterFunction="tabChangerHandler('out');"
									 topDiv="inOutSearchDiv"
									 rightDiv="inDIV">
							</pms:tab>
							</pms:AuthTag>
							<pms:AuthTag authName="charge_bankCollection.do?method=initInList">
							<pms:tab tabId="areaBaseInfo"
									 baseUrl="${ctx}/charge_bankCollection.do?method=initInList"
									 afterFunction="tabChangerHandler('in');"
									 caption="${key.charge_collection_in_list}"
									  topDiv="inOutSearchDiv"
									 rightDiv="outDIV">
							</pms:tab>
							</pms:AuthTag>

							<pms:tab tabId="bankAccount"
									 baseUrl="${ctx}/charge_bankAccountAction.do?method=initEmptyBankAccountList"
									 topDiv="bankAccountSearchDiv"
									 caption="银行账号">
							</pms:tab>
						</pms:tabPanel>
          			</td>
            	</tr>
          	  </table>
      </td>
    </tr>
  </table>
</div>

</body>
</html>
